﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;

namespace ZlenStack.DeviceCenter.Infrastructure.EntityFrameworks
{
    public class DeviceCenterDesignTimeDbContextFactory : IDesignTimeDbContextFactory<DeviceCenterDbContext>
    {
        public DeviceCenterDbContext CreateDbContext(string[] args)
        {
            var optionsBuilder = new DbContextOptionsBuilder<DeviceCenterDbContext>();
            optionsBuilder.UseSqlServer("Data Source=.;Initial Catalog=DeviceCenter;Integrated Security=False;User ID=sa;Password=mzl04592");

            return new DeviceCenterDbContext(optionsBuilder.Options);
        }
    }
}
